test(local): raise server.spec.ts CLI-exit timeout and log actual duration - #843
Merged
Merged
Conversation
…ation runCli()'s 8000ms hard timeout occasionally flaked under full-suite Docker runs, where the concurrently-running Playwright browser projects add CPU contention that slows tsx's cold-start compile beyond that budget (#841). Raise the default to 20_000ms (test timeouts to 25_000ms) and log the real elapsed time on every exit so future flakes leave duration data instead of a binary pass/fail.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
packages/@burger-editor/local/src/commands/server.spec.tsのrunServerCommand boot (virtualTree)系テストが、yarn test(Docker 経由のフルスイート実行)で時折CLI did not exit within 8000msで失敗する問題(#841)を修正します。原因
runCli()の子プロセス起動(tsx 経由での TypeScript ソース実行)が、Docker(QEMU エミュレーション込み)+他プロジェクト(core/custom-element/blocks/vr)が同時に Playwright ブラウザインスタンスを起動する負荷下で、ハードコードされた 8000ms を超えることがありました。対応内容
runCli()のデフォルトtimeoutMsを 8000ms → 20000ms に引き上げ、対応する2つのtest()のタイムアウトも 15000ms → 25000ms に引き上げrunCli()に開始時刻の計測を追加し、プロセス終了時に実際の所要時間をconsole.infoでログ出力するようにしました。次回 flaky が発生した際に「8000ms を超えた」という二値情報ではなく、実測データを CI ログから得られるようにするためです検証
NX_WORKSPACE_ROOT_PATHを指定した worktree 内でyarn build→yarn test(Docker 経由フルスイート)を実行し、全90ファイル・984テストがパスすることを確認関連